<?
//require_once 'ErrorsCollector.class.php';

/**
 * Delegation for ErrorsCollector class
 * Uses in Action. Action extends code from this package.
 * 
 * @package SpotLight.core.error
 * @see SpotLight.core.events.Action
 * @author asmhack
 * @version since begin
 * @license GPL
 * @copyright Serhiy Zaporozhets'
 */
class Errors {
   
   private $ec;
   public function __construct() {
      $this->ec = ErrorsCollector::getInstance ();
   }
   
   final public function setError($error, $key = null) {
      $this->ec->setError ( $error, $key );
   }
   
   final public function getError($key) {
      return $this->ec->getError ( $key );
   }
   
   final public function getAllErrors() {
      return $this->ec->getAllErrors ();
   }
   
   final public function clear() {
      $this->ec->clear ();
   }
   
   final public function isAnyErrors() {
      return $this->ec->isAnyErrors ();
   }
}
?>